package com.eastdigit.bpm.service;

import java.util.Map;

import net.sf.json.JSONObject;

import org.springframework.stereotype.Service;

import com.eastdigit.bpm.model.FormEntity;

/**
 * 表单定制的处理类 Created by Administrator on 2015/10/14.
 */
@Service("dZFormService")
public class DZFormService extends AbstractFormService {
    @Override
    public FormEntity add(final Map<String, String> properties) {
        FormEntity entity = new FormEntity() {
            @Override
            public String getId() {
                return String.valueOf(intId());
            }

            @Override
            public JSONObject toJSONObject() {
                JSONObject jsonObject = new JSONObject();
                for (String key : properties.keySet()) {
                    jsonObject.put(key, properties.get(key));
                }
                return jsonObject;
            }
        };
        return entity;
    }

    @Override
    public void update(Map<String, String> properties) {

    }

    @Override
    public JSONObject toJSONObject(String id) {
        return null;
    }

	@Override
	public void delete(String id) {
		// TODO Auto-generated method stub
		
	}
    
    
}
